//: Playground - noun: a place where people can play

import UIKit

var str = "Hello, playground"

enum GameEnding {
    case Win
    case Lose
    case Draw
}

var yourScore:Int = 102
var enemyScore:Int = 100

var theGameEnding:GameEnding = GameEnding.Lose

if yourScore > enemyScore {
    theGameEnding = GameEnding.Win
}

switch theGameEnding
{
case GameEnding.Win: print("win!")
default: print("fuck you!")
}


enum Month: Int{
    case Jan = 1,  Feb,  Mar
}

let curMonth:Month = Month.Jan
curMonth.rawValue

let nextMonth:Month? = Month(rawValue: 2)
nextMonth!.rawValue

var userInputNumber:Int = 12
if let theMonth = Month(rawValue: userInputNumber)
{
    switch theMonth{
    case Month.Jan :  print("aaaa");
    default: print("aaaa");
    }
}
else{
    print("bbbb")
}

//
//enum VowelCharacter:Character{
//    case A = "a"
//    case e = "e"
//}


enum Barcode{
    case UPCA(Int,Int,Int,Int)
    case QRCode(String)
}


let productCodeA= Barcode.UPCA(1, 1, 1, 1)
let productCodeB:Barcode = .QRCode("this is a infomathion")


